#include<iostream>
#include"Log.hpp"
#include<cstdlib>
#include"udp_server.hpp"
#include<memory>
int main(int argc,char* argv[])
{
    if(argc!=2)//启动时  输入端口号port
    {
        logMessage(ERROR,"%s","参数传递错误: ./xxx port ");
        exit(1);
    }
    uint16_t port = atoi(argv[1]);//获取端口号
    std::unique_ptr<UdpServer> svr(new UdpServer(port));
    svr->initServer();
    svr->Start();
    std::cout<<port<<std::endl;
    return 0;
}